package com.shujunjun.project.strategy.more;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author wsh
 * @since 2024/3/17 11:41
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class More2ServiceImpl implements More {

    final MoreStrategy moreStrategy;

    @Override
    public Integer method2(Integer num) {
        log.info("数据：{}", num);
        return num + 3;
    }

    @Override
    public void afterPropertiesSet() {
        moreStrategy.register("more2", this);
    }
}
